package com.weaponlin.domain;

import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class MapTest {

    public static void main(String[] args) {
        Map<Integer, Integer> map0 = new HashMap<>();
        map0.put(1, null);
        map0.put(null, 1);
        map0.forEach((k,v) -> System.out.println(k + ": " + v));
        Map<Integer, Integer> map = new ConcurrentHashMap<>();
        map.putIfAbsent(null, 3);
        System.out.println(map.get(1));
    }
}
